<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>注册</title>
    <script>
        function refreshCaptcha() {
            const random = new Date().getTime();
            document.getElementById('captchaImg').src = 'register?' + random;
        }
    </script>
</head>
<body>
<form action="login" method="post">
    用户名<br/>
    <input type="text" name="username"><br/>
    密码<br/>
    <input type="password" name="password"><br/>
    验证码
    <img id="captchaImg" src="register" style="width: 50px;height: 30px" alt="Captcha" onclick="refreshCaptcha()">
    <br/>
    <input type="text" name="code"><br/>
    <input type="submit"><br/>
</form>
</body>
</html>